import socket
import sys

#创建socket对象
s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
#获取本地主机名
host = socket.gethostname()
print(host)

port = 1422

#连接服务器
s.connect((host,port))

s.close()